
#include "nx_api.h"

#ifdef __PRODUCT_NETXDUO__
#include "netx_mdns_test.h"

/* Frame (77 bytes) */
static const unsigned char pkt1[77] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x18, 0x03, /* ..^..... */
0x73, 0x29, 0x5f, 0x66, 0x08, 0x00, 0x45, 0x00, /* s)_f..E. */
0x00, 0x3f, 0x3d, 0x61, 0x00, 0x00, 0xff, 0x11, /* .?=a.... */
0xdc, 0x3e, 0xc0, 0xa8, 0x00, 0x6a, 0xe0, 0x00, /* .>...j.. */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0x2b, /* .......+ */
0xba, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* .J...... */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x41, /* .......A */
0x52, 0x4d, 0x4d, 0x44, 0x4e, 0x53, 0x54, 0x45, /* RMMDNSTE */
0x53, 0x54, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, /* ST.local */
0x00, 0x00, 0x01, 0x00, 0x01                    /* ..... */
};

/* Frame (138 bytes) */
static const unsigned char pkt2[138] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x11, /* ..^..... */
0x22, 0x33, 0x44, 0x57, 0x08, 0x00, 0x45, 0x00, /* "3DW..E. */
0x00, 0x7c, 0x00, 0x07, 0x40, 0x00, 0xff, 0x11, /* .|..@... */
0x90, 0x2c, 0x0a, 0x00, 0x00, 0x42, 0xe0, 0x00, /* .,...B.. */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0x68, /* .......h */
0xb9, 0x74, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, /* .t...... */
0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x41, /* .......A */
0x52, 0x4d, 0x4d, 0x44, 0x4e, 0x53, 0x54, 0x65, /* RMMDNSTe */
0x73, 0x74, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, /* st.local */
0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, /* ........ */
0x78, 0x00, 0x04, 0x0a, 0x00, 0x00, 0x42, 0x0b, /* x.....B. */
0x41, 0x52, 0x4d, 0x4d, 0x44, 0x4e, 0x53, 0x54, /* ARMMDNST */
0x65, 0x73, 0x74, 0x05, 0x6c, 0x6f, 0x63, 0x61, /* est.loca */
0x6c, 0x00, 0x00, 0x2f, 0x80, 0x01, 0x00, 0x00, /* l../.... */
0x00, 0x78, 0x00, 0x16, 0x0b, 0x41, 0x52, 0x4d, /* .x...ARM */
0x4d, 0x44, 0x4e, 0x53, 0x54, 0x65, 0x73, 0x74, /* MDNSTest */
0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x00, 0x00, /* .local.. */
0x01, 0x40                                      /* .@ */
};


MDNS_TEST_SEQ mdns_case_insensitivity[] = {
    {TITLE, "Case-insensitivity", 18, 0},
    {WAIT, NX_NULL, 0, 5},
    {DUMP, NX_NULL, 0, 0},

    /* Inject a query with upper-case name. */
    {INJECT, (char*)&pkt1[0], sizeof(pkt1), 0},
    
    /* Check the response. */
    {MDNS_CHECK_DATA_V4, (char*)&pkt2[0], sizeof(pkt2), 1},
};

int mdns_case_insensitivity_size = sizeof(mdns_case_insensitivity) / sizeof(MDNS_TEST_SEQ);

#endif /* __PRODUCT_NETXDUO__  */
